Skip to content

feat: 集成 HiCoding 模块与 Skill 市场功能#178

Merged
learnerjohn merged 76 commits intohigress-group:mainfrom
lexburner:feat/qoder-cli-main
Mar 16, 2026
Merged

feat: 集成 HiCoding 模块与 Skill 市场功能#178
learnerjohn merged 76 commits intohigress-group:mainfrom
lexburner:feat/qoder-cli-main

Conversation

@lexburner
Copy link
Copy Markdown
Contributor

@lexburner lexburner commented Mar 16, 2026

📝 Description

本 PR 为 HiMarket 集成了 HiCoding 模块和 Skill 市场功能。

主要功能

HiCoding 模块

  • 集成 OpenSandbox 沙箱执行环境,支持安全代码执行
  • 支持多运行时策略(K8s 共享 Pod 模式)
  • WebSocket 会话管理与断连重连机制
  • 交互式终端和工作空间文件树
  • 编辑器视图,支持代码高亮和文件操作

Skill 市场

  • 支持技能包上传与预览
  • 集成市场 MCP Server 和 Skill
  • 支持 Agent Skill 绑定

依赖要求

  • Nacos 3.2.0-BETA 以上版本

✅ Type of Change

  • New feature (non-breaking change which adds functionality)

🧪 Testing

  • Manual testing completed
  • All tests pass locally

🤖 Generated with [Qoder][https://qoder.com]

- 新增 AgentMessage 组件用于显示 AI 消息
- 实现 ChatStream 组件用于聊天消息流展示
- 创建 CodingInput 组件提供编码会话输入功能
- 开发 CodingSidebar 组件管理编码任务列表
- 构建 CodingTopBar 组件显示状态和配置选项
- 添加 CodingWelcome 组件作为欢迎界面
- 实现 DiffViewer 组件用于文件差异对比
- 创建 PermissionDialog 组件处理权限请求确认
- 开发 PlanDisplay 组件展示任务计划
- 添加 SlashMenu 组件提供命令菜单功能
- 实现 TerminalOutput 组件显示终端输出
- 创建 ThoughtBlock 组件展示思考过程
- 开发 ToolCallCard 组件显示工具调用卡片
- 添加 ToolPanel 组件提供工具面板功能
- 实现 UserMessage 组件显示用户消息
- 在 Header 组件中添加 HiCoding 导航标签
- 创建 CodingSessionContext 提供编码会话上下文管理
- 新增 ArtifactRenderer 组件用于根据文件类型渲染不同内容
- 实现 HtmlRenderer、MarkdownRenderer、SvgRenderer、ImageRenderer、PdfRenderer 等渲染器
- 添加 FileRenderer 用于显示文件类型的通用预览界面
- 集成 ArtifactPreview 组件支持文件预览和下载功能
- 在 AgentMessage 中添加 compact 变体样式选项
- 扩展 ChatStream 组件支持工作单元卡片和滚动功能
- 为 CodingInput 添加文件附件上传和拖拽支持功能
- 更新 PlanDisplay 组件支持内联变体和展开收起功能
- 新增 ChangesView 组件用于显示代码变更差异
- 集成 Ant Design Image 组件用于图片预览功能
- 新增多个 ACP 相关页面文档,包括入门介绍、架构说明、客户端、代理及库列表
- 更新 ACP 注册表说明,涵盖代理列表及使用提交流程
- 添加多语言库支持介绍文档,包含 Kotlin、Python、Rust、TypeScript 和社区维护库
- 补充.gitignore 文件,忽略新的工作空间目录
- 新增 AGENTS.md,规范所有答复均使用简体中文回复
…enant AI IDE support

- Add comprehensive requirements document detailing HiWork design and user stories
- Implement WebSocket-to-stdio ACP proxy and AgentRun lifecycle management specifications
- Define multi-tenant session isolation, resource limits, and support for multiple Agent types
- Update workspace path handling to properly resolve absolute and relative paths securely
- Extend token utility to support JWT expiration with day unit
- Increase JWT expiration duration from 2 hours to 7 days in configuration
- Rename UI labels from "HiCoding" to "HiWork" to reflect rebranding
- Enhance DiffViewer to use 'diff' library for better diff line handling and display
- Add user scroll interaction detection and task completion toast with browser notifications
- Add queued prompt handling in CodingInput with UI for queued messages management
- Introduce unit tests for ChangesView and ChatStream components to improve test coverage
- Add new dependencies like 'diff', 'vitest', and testing-library for improved development experience
- Include TerminalView component import and adjustments for RightPanel enhancements
- Rename all components and context files from 'coding' to 'quest'
- Update imports and references in all affected files accordingly
- Replace useCodingState and useCodingDispatch hooks with quest equivalents
- Rename CodingSessionContext and related types to QuestSessionContext
- Adjust routing and page components from /coding to /quest and related names
- Introduce auto-permission logic in useAcpSession for permission requests
- Modify Header tabs to replace "/coding" path with "/quest" for HiWork tab
- Update tests and mocks to use QuestSessionContext instead of CodingSessionContext
- Add TerminalProcess class using pty4j for PTY shell processes
- Implement TerminalWebSocketHandler for WebSocket-based shell interaction
- Update SecurityConfig to allow /ws/terminal WebSocket endpoint
- Register TerminalWebSocketHandler in WebSocketConfig
- Add DevProxyController to proxy requests to local dev servers by port
- Extend WorkspaceController with API for directory tree retrieval with depth control
- Enhance ResponseAdvice to support Mono types in unified response handling
- Incorporate terminal-related dependencies in pom.xml (pty4j)
- Introduce coding UI components: Header tab, CodingTopBar, EditorArea, FileTree,
  PreviewPanel, TerminalPanel with xterm.js integration and WebSocket connection
- Update frontend dependencies to add @monaco-editor/react, @xterm/xterm, and addons
- Add UX improvements for workspace file browsing and terminal output handling
- Maintain security and error handling standards in new WebSocket and REST endpoints
… calls

- Enhance AgentMessage to linkify file paths with clickable, accessible spans
- Add onOpenFile handlers to AgentMessage, ChatStream, WorkUnitCard and Coding page
- Implement file path open logic in CodingContent with content fetching and tab switching
- Refactor ToolCallCard: introduce EditCard and ExecuteCard components with expandable diffs and commands
- Add merged rendering of consecutive auxiliary tool calls in WorkUnitCard with expandable group rows
- Improve ThoughtBlock with streaming duration display and adaptive styles
- Update UI colors and typography for better consistency in PlanDisplay, ThoughtBlock, and ToolCallCard
- Fix styling and accessibility issues on interactive elements across components
…tion

- Introduce FileMentionMenu component to display file list with icons and selection support
- Implement flattening and filtering utilities for file trees matching input queries
- Add "@" mention detection in QuestInput to trigger file mention menu with filter
- Enable keyboard navigation (arrow keys, enter) and mouse selection in mention menu
- Load and cache workspace file tree asynchronously on first mention trigger
- Insert selected file mention text and create file path attachments in input context
- Show loading and empty states in mention menu during file fetch and filtering
- Update QuestInput state and handlers to support mention menu visibility and interactions
- 扩展配置支持多个 CLI Provider,包括命令、参数和环境变量配置
- 新增 /cli-providers 接口,列出所有可用的 CLI Provider 并检测命令可用性
- WebSocket 握手时支持通过查询参数选择特定 CLI Provider,默认使用全局配置
- AcpProcess 支持传入额外环境变量,增强子进程启动灵活性
- 修改前端 ACL 路由,新增 /cli-providers 路径支持
- 增加了多种 CLI Provider 的单元及集成测试,覆盖初始化、会话与命令可用性检测
- 统一日志与错误处理,清晰标示具体 CLI Provider 的启动与通讯状态
- 将CliProviderSelect中的原生select替换为Ant Design的Select组件
- 优化CliProviderSelect的样式和交互,支持禁用选项显示
- CodingTopBar和QuestTopBar中模型选择下拉也改用Ant Design的Select
- update application.yml,新增opencode CLI命令配置,修改qwen-code命令名链接
- 统一调整聊天和任务相关组件中的字体大小和行距,提升文本可读性
- 优化各组件的间距和圆角样式,增强界面一致性和美观度
- WorkUnitCard组件改进动作区域的展开逻辑,避免手动切换时自动展开干扰
- PlanDisplay和ThoughtBlock组件调整边框和按钮样式,实现统一的交互体验
- Messages和AgentMessage组件详细调整Markdown渲染的样式类,提高视觉效果
- 更新index.css引入Inter和Noto Sans SC字体,并优化字体平滑显示效果
- 迁移 acp-demo ACP 协议调试功能到 himarket-frontend,形成独立 HiCli 模块
- 扩展 QuestSessionContext,新增调试相关状态和 action,管理原始消息与聚合日志
- 实现 useHiCliSession Hook,支持 WebSocket 连接、日志处理及会话操作
- 新建 HiCli 专用组件(HiCliSelector、HiCliTopBar、AcpLogPanel、AgentInfoCard 等)
- 创建 HiCli 页面,集成聊天区和调试面板,支持多会话切换和权限请求
- 使用 Tailwind CSS 与 Ant Design 统一样式,替代 acp-demo 原生 CSS
- 添加 /hicli 路由及导航标签,确保与平台其他模块风格和流程一致
- 迁移日志聚合器和日志过滤器,新增对应的属性测试保障正确性
- 完成 Agent 信息展示、ACL 日志面板、调试标签切换等核心功能需求
- 在服务器配置中新增 isolateHome 选项,实现 CLI 工具凭证隔离机制
- 新增 ChatItemError 类型,支持完整错误码、消息及扩展数据存储
- 在 questReducer 中新增 PROMPT_ERROR action,追加错误消息且更新处理状态
- 修改 useAcpSession 和 useHiCliSession Hook,捕获并分发 PROMPT_ERROR 替代原错误处理
- 创建 ErrorMessage 组件以视觉区分错误信息,支持错误码、消息及扩展数据展示
- 扩展 ChatStream 组件以渲染 error 类型 ChatItem
- 完整链路确保ACP错误响应从resolveResponse到UI展示错误信息不丢失
- 使用 fast-check 实现多项属性测试覆盖类型定义、状态更新、Hook行为及UI渲染等关键环节
- 引入 RuntimeAdapter 接口及 LocalRuntimeAdapter 和 K8sRuntimeAdapter 实现
- 设计 RuntimeFactory 根据类型创建对应运行时实例
- 统一后端通过 RuntimeAdapter 管理 CLI 进程生命周期和通信
- 前端新增 RuntimeSelector 组件支持运行时方案选择
- useAcpSession Hook 扩展支持运行时参数传递
- 完成文件系统抽象和通信适配,保障跨运行时一致性
- 集成 K8s 客户端动态管理 Pod,实现沙箱隔离和资源限制
- 支持运行时健康检查及异常通知机制,提升稳定性
- 提供详细设计文档和多项属性基测试保障正确性和安全性
- 引入欢迎页和CLI选择器,页面加载时不再自动建立WebSocket连接
- 选择CLI后构建连接URL并建立连接,连接成功后自动创建Quest会话
- 移除QuestTopBar和CodingTopBar顶部栏中的CLI切换下拉框
- 侧边栏底部新增切换工具按钮,实现断开连接并返回欢迎页
- useAcpSession和useAcpWebSocket支持URL为空时不自动连接
- 新增autoCreatedRef状态,断开连接时重置,防止切换后会话丢失
- 提取公共CliSelector组件复用hiwork、hicoding和hicli的CLI选择逻辑
- 设计并计划基于属性的测试确保Reset State、连接管理及状态同步的正确性
- 新增文件大小限制,文本文件最大2MB,二进制文件最大20MB,超过限制返回413错误
- 文件预览接口支持根据编码(utf-8/base64)正确返回内容
- 编辑器支持显示图片类型文件,新增ImageRenderer渲染图片内容
- 目录树节点限制最多展示2000个,超出时标记truncated并在UI显示警告信息
- 增加前端文件
- 制定多租户环境下CLI工具凭证的归属模型,包括平台凭证、用户凭证和混合模式
- 定义开源CLI与商业CLI的认证策略分类及凭证注入机制
- 设计凭证的安全存储方案,支持加密、访问控制和轮换管理
- 设计凭证自动注入机制,实现无感知认证启动体验
- 设计用户凭证管理界面,支持凭证绑定、验证和撤销
- 管理平台凭证与用户用量配额,控制调用额度和访问权限
- 实现认证架构与多运行时环境(Local、K8s)无缝集成
- 定义从POC到生产的认证架构分阶段演进策略
- 优先推荐使用开源CLI与自有模型端点,提升平台控制力
- 定义 CustomModelConfig 数据模型,支持 baseUrl、apiKey、modelId、modelName、protocolType字段及校验
- 实现 CliConfigGenerator 接口及两种生成器 OpenCodeConfigGenerator 和 QwenCodeConfigGenerator
- 支持生成并合并 opencode.json 与 .qwen/settings.json 文件,确保配置文件合法且包含用户自定义模型
- 扩展 AcpHandshakeInterceptor 从 WebSocket 查询参数解析 customModelConfig JSON,存入会话属性
- 在 AcpWebSocketHandler 启动CLI进程前注入自定义模型配置及环境变量,启动失败时清理生成的配置文件
- 扩展 CliProviderConfig 和响应,新增 supportsCustomModel 字段以标识支持自定义模型的CLI工具
- 前端新增 CustomModelForm 组件,动态展现自定义模型配置表单并完成字段校验
- 通过 WebSocket URL 查询参数传递序列化的自定义模型配置,实现前后端联动切换模型
- 在 application.yml 配置文件标记 OpenCode 和 QwenCode 支持自定义模型,默认其他CLI工具不支持
- 将 .mvn/jvm.config.bak 重命名为 .mvn/jvm.config
- 删除 .mvn/maven.config.bak 文件内容
- 将数据库迁移脚本 V6__Add_k8s_cluster_table.sql 重命名为 V7__Add_k8s_cluster_table.sql
- 新增 BaseUrlExtractor 工具类,实现从产品路由配置提取模型接入点 baseUrl
- 新增 ProtocolTypeMapper 工具类,实现协议类型字符串映射
- 在 CliProviderController 中新增 GET /cli-providers/market-models 接口,返回当前开发者已订阅的 MODEL_API 类型模型列表及 apiKey
- 接口根据开发者主消费者获取订阅,筛选 APPROVED 状态且产品类型为 MODEL_API 的产品,跳过不符合条件的产品并记录日志
- 组装 MarketModelInfo DTO,包含 productId、name、modelId、baseUrl、protocolType、description
- 处理无主消费者、无订阅以及凭证缺失等边界情况,返回空列表及 null apiKey
- 日志打印关键警告信息,保证接口鲁棒性与正确性
- 新增后端接口 GET /cli-providers/market-mcps,返回已订阅 MCP Server 列表及认证信息
- 新增后端接口 GET /cli-providers/market-skills,返回已发布 Skill 列表,无需认证
- 扩展 CliSessionConfig 数据模型,支持传递 customModelConfig、mcpServers 和 skills
- AcpHandshakeInterceptor 支持解析 cliSessionConfig 参数,保持向后兼容 customModelConfig 参数
- AcpWebSocketHandler 启动时调用 generateMcpConfig 和 generateSkillConfig 注入 MCP 和 Skill 配置
- 扩展 CliConfigGenerator 接口,新增默认方法生成 MCP 和 Skill 配置,支持按需覆盖
- QwenCodeConfigGenerator 实现 MCP 配置写入 .qwen/settings.json 和 Skill 配置写入 .agents/skills/*/SKILL.md
- 新增前端 MarketMcpSelector 和 MarketSkillSelector 组件,实现 MCP Server 和 Skill 的列表展示及选择
- 扩展公共 CliSelector 组件状态管理,组装完整 CliSessionConfig 并通过 WebSocket 传递
- 扩展前端 API 接口,支持市场 MCP 和 Skill 的获取及 Skill 文件下载
- 增加 CliProviderConfig 和 CliProviderInfo 支持 MCP 和 Skill 的能力标记
- WebSocket URL 支持新增 cliSessionConfig 查询参数,兼容旧参数 customModelConfig
- 设计及测试文档详述架构方案、数据模型、错误处理及属性测试策略,保证功能正确性及兼容性
- 实现多种异常及边界处理逻辑,保证前后端稳定运行与良好体验
- 移除 useAcpSession 中 WebContainer 适配器和文件同步服务相关代码
- 删除所有关于 WebContainer 运行时的单元测试用例
- 去除 package.json 中 @webcontainer/api 依赖
- 调整 useAcpSession 测试只覆盖 WebSocket 通信分支
- 移除 webcontainer 模式下的错误处理及连接管理代码
- 删除 FileSyncService 及相关测试代码和依赖
- 简化 useAcpSession 返回,不再包含 runtimeError 和 reconnect 特殊处理
- 新增基于 Node.js 的 Sidecar Server,支持通过 WebSocket URL 动态指定 CLI 命令
- Sidecar Server 维护命令白名单,拒绝非白名单命令连接
- 实现多并发 WebSocket 会话隔离与双向消息桥接 CLI stdin/stdout
- 完善 CLI 子进程生命周期管理,支持优雅关闭和异常处理
- 提供健康检查 HTTP 端点,反映当前连接数和进程数
- 改造沙箱镜像及入口脚本,移除 websocat 用新的 Sidecar Server 启动逻辑
- 后端 Java 代码改造:
  - 移除 Pod 环境变量中的 CLI_COMMAND/CLI_ARGS,新增 ALLOWED_COMMANDS 参数
  - 简化 Pod 复用逻辑,不再区分 provider 标签
  - 动态构建 Sidecar WebSocket URI,包含 CLI 命令及参数
  - AcpWebSocketHandler 传递 CLI 参数至 K8sRuntimeAdapter,注入配置到 Pod
- 新增属性和单元测试覆盖命令校验、URI 构造、Pod 规格及连接生命周期
- 优化日志和错误处理,提升系统稳定性和安全性
- 引入 SandboxProvider 抽象,多种沙箱类型实现统一接口
- 本地沙箱启动 Sidecar Server,文件操作统一通过 Sidecar HTTP API
- K8s 沙箱改用 Pod 内 Sidecar HTTP API 替代 kubectl exec 操作文件
- 消除 Handler 中 Runtime 类型分支,统一通过 SandboxProvider 交互
- 实现 SandboxInitPipeline 统一初始化流程,所有沙箱共用
- 完善初始化阶段设计,支持沙箱获取、文件系统健康检查、配置注入等
- 新增 SandboxProviderRegistry 管理多种沙箱提供者实例
- 定义统一沙箱配置 SandboxConfig 和沙箱信息 SandboxInfo 结构
- 适配前端 WebSocket 与后端流水线调用,保证行为一致性
- 提升架构扩展性,支持未来新增 E2B 等多种沙箱类型
- 统一错误处理与重试策略,保证初始化可靠性
- HiWork 和 HiCoding 启用运行时选择器,支持本地与 K8s 运行时切换
- WebSocket URL 增加 sandboxMode 参数,K8s 模式传递 user 级沙箱参数
- HiWork 和 HiCoding 页面展示沙箱状态(creating、ready、error)
- K8s 沙箱就绪后自动创建 Quest,避免 Pod 未准备完成时请求失败
- HiCli CliSelector 补充传递 sandboxMode 参数及认证方案差异化支持
- 增加认证方案步骤,根据 CLI 工具支持展示分别认证选项
- 后端 CliProviderConfig 扩展 authOptions 和 authEnvVar,支持认证凭据注入环境变量
- 按 CLI 工具差异化生成 MCP 与 Skill 配置文件路径,新增相关 ConfigGenerator 实现
- 运行时选择单一选项时自动选中,提升用户体验
- 提供 Kiro CLI 沙箱认证待支持提示,禁用对应运行时连接按钮
- 增加全面的属性测试和单元测试覆盖正确性及异常处理
- 升级 Dockerfile 基础镜像,注释调整 Arthas 安装步骤
lexburner added 22 commits March 6, 2026 11:03
…ents

- Delete HiCli page, HiCliSessionContext, and useHiCliSession hook
- Remove hicli/ directory components (AcpLogPanel, AgentInfoCard, HiCliSelector, etc.)
- Migrate shared components from hicli/ to common/ (CustomModelForm, MarketMcpSelector, etc.)
- Remove HiCli routes and navigation entries from Header and router
- Delete HiCli-specific test files and context tests
- Update .gitignore to exclude OpenSandbox local clone
- Preserve all backend sandbox infrastructure (LocalSandboxProvider, K8s providers, etc.)
- Update design and requirements documentation to reflect frontend-only cleanup scope
- HiCli served its purpose as POC for ACP protocol validation; HiCoding now handles all CLI interactions
…dbox services

- Extract SessionConfigResolver service to handle CLI session configuration parsing independently
- Extract ConfigFileBuilder service to generate configuration files from resolved configs
- Extract AcpSessionInitializer to orchestrate session initialization pipeline
- Extract AcpMessageRouter to handle WebSocket message routing and forwarding
- Extract AcpConnectionManager to manage connection lifecycle and resource cleanup
- Add SandboxHttpClient to unify HTTP communication across K8s and Local sandbox providers
- Add InitErrorCode enum for structured error classification and handling
- Add CliConfigGeneratorRegistry to manage CLI configuration generator implementations
- Refactor AcpWebSocketHandler to lightweight entry point delegating to specialized services
- Refactor ConfigInjectionPhase to use ConfigFileBuilder for config generation
- Update InitContext to carry resolved session configuration through pipeline
- Update SandboxProvider interface and implementations to use unified HTTP client
- Migrate architecture specification to .kiro/specs/hicoding-architecture-refactor
- Remove outdated poc-code-cleanup.md specification
- Reduce AcpWebSocketHandler from 1000+ lines to <200 lines by delegating responsibilities
- Eliminate code duplication between K8s and Local sandbox providers
- Prepare clean extension points for OpenSandbox integration
- 重新定义SandboxType枚举,包含LOCAL、SHARED_K8S、OPEN_SANDBOX、E2B四种类型,移除旧K8S
- 实现SharedK8sSandboxProvider,连接Helm预置共享沙箱Pod,无需动态调用K8s API
- 保留OpenSandboxProvider和E2BSandboxProvider空实现,预留未来扩展接口
- 更新SandboxProviderRegistry注册逻辑,支持多沙箱类型自动注册
- 修改RuntimeSelector适配四种沙箱类型,更新运行时可用性判断和UI标签
- 新增Helm模板部署共享沙箱Deployment和ClusterIP Service
- 移除旧的共享模式开关,增加共享Pod服务名配置,默认运行时改为shared-k8s
- 工作目录实现基于用户ID隔离,Sidecar自动为每用户spawn独立CLI进程
- 支持旧值"k8s"向后兼容映射为SHARED_K8S,前端runtime参数同步更新
- 明确多用户并发访问共享Pod机制和安全隔离策略,简化权限需求,提升部署便捷性
…ation

- Add connection resilience specs for HiCoding with design, requirements, and tasks documentation
- Implement path normalization in artifactDetector to eliminate format inconsistencies (e.g., "./" prefix, duplicate slashes)
- Refactor artifact detection to trigger only on completed/failed tool_call status, eliminating duplicate detections
- Add ConnectionBanner component to display WebSocket connection status and reconnection progress
- Implement exponential backoff reconnection strategy with infinite retry for ACP WebSocket
- Add terminal WebSocket reconnection trigger when ACP connection recovers
- Remove legacy CodingSession entity, repository, controller, service, and related DTOs
- Update DevProxyController and WorkspaceController to remove CodingSession dependencies
- Refactor ACP connection manager and WebSocket handler for improved resilience
- Update K8s workspace service initialization phases for better config injection
- Migrate frontend components to use unified ACP session management via useAcpSession hook
- Remove SessionSidebar component and codingSession API module
- Add sandbox push script for AMD64 architecture
- Update Nacos skill maintenance documentation
- Resolves duplicate artifact detection and improves user experience during connection interruptions
- Reformat method parameters and switch cases in WorkspaceController for consistency
- Refactor K8sWorkspaceService file download logic with improved line breaks
- Update QuestSessionContext to use null instead of undefined for state initialization
- Remove unused noRuntimeProvider test fixture from useRuntimeSelection tests
- Remove unused RECONNECT_CONFIG import from useTerminalWebSocket
- Add type assertion for Blob creation in workspaceApi to fix type compatibility
- Add push-podman.sh script for container image deployment automation
…kill

- Add Nacos default instance and namespace concept to auto-bind Agent Skills
- Extend nacos_instance table with is_default and default_namespace fields via Flyway V9-V10
- Implement default Nacos instance management APIs in NacosService and NacosController
- Refactor SkillController to resolve Nacos coordinates through productId instead of direct paths
- Replace SkillPackageParser with SkillZipParser and add FileTreeBuilder and SkillMdBuilder utilities
- Remove SkillFile entity and SkillPackageService, consolidate into SkillService
- Add UpdateSkillNacosParam DTO for skill-nacos association updates
- Implement ProductService auto-binding of default Nacos instance for new AGENT_SKILL products
- Add ApiProductLinkNacos component for frontend Nacos linking UI
- Update NacosConsoles and ApiProductDetail pages to support default instance management
- Enhance skill market capability checklist and add comprehensive Nacos integration specifications
- Update ACP config generators to support Nacos skill integration
- Migrate skill package upload flow to use new Nacos-integrated architecture
…e and runtime services

- Add NacosEnvGenerator for Nacos environment variable configuration injection
- Add SkillDownloadPhase for Agent Skill artifact download during initialization
- Add ExecResult model for sandbox execution result handling
- Rename K8sWorkspaceService to RemoteWorkspaceService for broader runtime abstraction
- Update WorkspaceController to support runtime parameter routing (k8s/local)
- Enhance ACP session initialization with Nacos configuration and skill download phases
- Update ConsumerService and NacosServiceImpl for improved service integration
- Add comprehensive sandbox integration documentation (SANDBOX_GUIDE.md)
- Update Kiro specs for sandbox terminal, file tree, and Nacos CLI integration
- Refactor sandbox Dockerfile and sidecar server for enhanced runtime support
- Update WebSocket URL resolution and ACP session hooks for runtime awareness
- Add and update unit tests for new phases, config generators, and workspace service
- Improve skill upload script for sandbox artifact management
- Add authentication token support to skill package downloads in frontend components
- Implement proper Authorization header handling for API requests
- Replace anchor tag with button component for download functionality with error handling
- Add skeleton loading states to ApiProductDetail for better UX during data fetch
- Prevent menu item flickering by conditionally rendering navigation based on data availability
- Update SkillZipParser to handle single-part resource paths without skill name prefix
- Enhance upload-skills.sh script with automatic portal publication after successful skill upload
- Add portal discovery logic to automatically publish skills to default portal when available
- 将所有包路径中的 acp 修改为 hicoding,涵盖 websocket、runtime、sandbox、cli、filesystem 等模块
- 更新所有相关类的包导入路径,如 WebSocketConfig 中的处理器和拦截器
- 重命名了多个服务类及配置类的包路径以反映命名空间调整
- 修正注释中的 Handler 名称对应包路径变更
- 统一替换 ACP 命名为 HiCoding,确保整体代码结构一致性
- 调整 sandbox 初始化相关类的包路径及导入,保持依赖正确
- 重构运行时和沙箱相关类的包路径,改进模块划分清晰度
- 描述了AI对话界面中低价值操作块折叠成分组卡片的设计背景与目标
- 详细阐述了整体架构,包含多层设计及数据流传递
- 说明了ACP协议细节、事件类型及流状态机对分组的影响
- 介绍了从ACP事件到渲染块的转换逻辑及SubAgent数据流处理
- 定义了核心概念,包括Block类型、工具分类与状态、活动分组属性
- 设计了策略模式及多种折叠策略的继承体系与选择算法
- 详解了分组算法核心流程、最后消息保护策略及flush机制
- 说明了isExploring状态判断及SubAgent递归处理流程
- 给出了策略折叠规则与各类型block折叠判断流程的设计思路
- 移除 RemoteRuntimeAdapter 中的闲置超时检测相关代码及相关字段
- 删除 lastActiveAt 状态和 idleTimeoutSeconds 配置
- 去除与闲置检测相关的定时任务调度和触发逻辑
- 简化了 WebSocket 连接的部分代码实现

fix(sandbox): 使用绝对路径替换相对路径以确保 exec 调用正确

- 在 SkillDownloadPhase 中将 nacos-env 配置文件路径及技能目录转换为绝对路径
- 添加 toAbsolutePath 方法,实现基于 workspacePath 拼接绝对路径
- 确保 exec 调用时工作目录无关,避免路径解析错误

feat(coding): 优化默认 CLI 和模型自动选择逻辑

- 移除 ConfigSidebar 中自动选中第一个可用 CLI 的代码
- 改为在 Coding.tsx 页面加载时自动异步选择默认 CLI Provider 和默认模型
- 使用全新 useCodingConfig Hook 管理配置状态,实现配置纯内存管理且不依赖 localStorage
- 在 send message 场景下,自动填充基本的 cliSessionConfig 包含 modelProductId,防止数据缺失

fix(adp): 处理 MODEL_API 模型不返回 methodPathList 场景

- 在 AdpAIGatewayOperator 中 MODEL_API 场景下,对缺失 methodPathList 的模型构造兜底路由
- 路由采用 basePath 拼接默认路径 "/v1/chat/completions"
- 确保 BaseUrlExtractor 能正确提取 baseUrl

chore(sandbox): 更新 Dockerfile 中的 nacos-cli 安装及验证

- nacos-cli 安装完成后改为执行 help 命令替代 version 命令验证安装结果
- 移除未适配的 kiro-cli 安装注释代码

style(code): 代码格式及导入整理

- 删除无用导入
- 统一类型定义换行格式
- 修正代码注释对齐与格式
- Remove unused fireEvent import from RuntimeSelector.test.tsx
- Add type assertions to wsUrl.test.ts test cases for cliSessionConfig parameter
- Resolve TypeScript linting issues in test files
- 新建 WebSocketPingScheduler 共享 Ping 调度器,为 ACP 和 Terminal Handler 提供定时 ping
- 集成 Ping 调度器到 HiCodingWebSocketHandler 和 TerminalWebSocketHandler 的连接生命周期方法
- RemoteTerminalBackend 添加心跳保活,定时发送协议级 ping 维持后端连接活跃
- RemoteTerminalBackend 实现断连自动重连,采用指数退避策略,最多重连 5 次后放弃
- 修改 WebSocketConfig 配置,设置最大空闲超时时间为 120 秒,提高连接稳定性
- 确保 ping 和重连任务使用守护线程,防止阻止 JVM 退出
- 增加异常捕获和日志,保证 ping 发送失败时不影响整体连接
- 完善单元测试和属性基测试,覆盖心跳和重连功能的正确性与健壮性
- 新增 coding_session 数据库表及对应实体 CodingSession,实现会话持久化
- 实现 CodingSession REST API 支持会话的增删改查操作
- 支持通过 WebSocket 拦截 session/new 和 session/load 请求,实现 cwd 路径绝对化
- 远程沙箱新增文件上传接口,限制单文件最大 5MB,支持 Base64 编码传输
- 远程文件路径自动关联用户工作空间,防止路径穿越问题
- 新增 CodingSessionServiceImpl 服务实现会话业务逻辑,支持用户最大会话数量限制
- 修正部分文档中“新建会话”按钮命名为“新会话”以保持一致
- 新增 HiCoding 全流程集成测试覆盖会话和 WebSocket 交互场景
- 数据库添加 coding_session 表的 model_product_id 和 model_name 字段
- CodingSession 实体及相关 DTO 新增 modelProductId 和 modelName 字段
- RemoteRuntimeAdapter 支持通过控制消息获取 sidecarSessionId
- 增加 detach() 方法进入 DETACHED 状态,关闭 WebSocket 但保留输出流以供重连
- 实现 reconnect() 方法支持基于 sidecarSessionId 重新连接 sidecar
- 新增 RuntimeStatus.DETACHED 表示 WebSocket 已断开但会话仍存活
- SandboxInfo 增加支持生成带 sessionId 的 attach 模式 WebSocket URI
- HiCodingConnectionManager 管理已 detach 的会话,支持查询、重用和销毁
- WebSocket 关闭时,如果是 RemoteRuntimeAdapter 且有 sidecarSessionId,改为 detach 保存会话
- HiCodingWebSocketHandler 优先尝试从已 detach 会话中恢复连接,跳过完整初始化
- 前端 Coding 相关增加 reattach 事件监听,支持恢复已有会话
- SessionSidebar 显示 providerKey 和 modelName 信息
- 调整 loadSession 流程,支持 load 返回 null 表示成功恢复会话,避免重复新建
- 会话加载时处理 providerKey,保证切换历史会话自动完成正确连接和重连逻辑
- 修复无 token 接口返回状态由 401 改为 403,统一访问控制响应状态
- 使用 highlight.js 实现基于语言的代码高亮展示,替代 Monaco Editor 只读模式
- 新增代码头部操作栏,支持文件刷新、复制、自动换行切换和下载功能
- 支持 PDF、图片和二进制文件的分别预览与下载
- 优化文件树组件,根据文件扩展名展示更丰富的图标分类
- 允许通过回调刷新编辑区文件内容,实现文件同步更新
- 删除旧的 Monaco Editor 相关依赖和代码,明确组件渲染逻辑
- 在 Coding 页面中添加刷新文件内容的回调处理,更新打开文件状态

chore(sidecar-server): 提取并模块化服务器主入口和配置文件

- 将原有冗长的 index.js 文件拆分成 server.js 和 config.js 两部分
- config.js 负责读取环境变量及默认配置,导出配置常量
- index.js 精简为仅导入并启动服务器,实现职责分离
- 保留旧版核心逻辑注释在提交记录供代码对比参考
- 将 sandbox 工作空间卷挂载改为本地持久化路径
- Helm 模板新增 sandbox 工作空间持久化 PVC 配置及相关值
- RemoteWorkspaceService 中路径校验方法改为基于用户目录校验,防止跨用户访问
- RemoteSandboxProvider 和 SkillDownloadPhase 增加路径越界安全检查
- 解除 SkillController 下载接口 AdminOrDeveloperAuth 注解限制
- RemoteRuntimeAdapter 处理多条 WebSocket 消息支持逐行解析控制信息
- HiCodingConnectionManager 增加定时清理过期分离的 detached 会话功能
- HiCodingWebSocketHandler 优化连接重连逻辑,确保重连存活
- WebSocketPingScheduler 线程池升级为双线程调度器
- CodingSessionServiceImpl 优化清理用户超额会话逻辑,支持分页删除
- 前端 CodingSessionContext 修复并优化历史消息回放中 user_message_chunk 处理
- 前端 useCodingSession 增强日志输出,方便调试 session 更新流程
- Coding 页面改进会话重置和恢复逻辑,避免自动恢复旧会话引发的问题
- sandbox 容器允许更多命令,包含 opencode 和 claude-agent-acp
- sidecar-server 优化会话关闭时输出缓存清理,修复重复清理问题
- sidecar-server 终端模块增加输出环形缓冲区,增强会话状态与活动时间跟踪
- 终端会话关闭和错误时触发专用销毁函数,保证状态一致性
- 其他若干日志和异常处理的细节修正和提升
忽略 AWS Kiro AI coding agent 的配置目录

🤖 Generated with [Qoder][https://qoder.com]
该目录包含 Kiro AI coding agent 的本地配置,不应提交到仓库

🤖 Generated with [Qoder][https://qoder.com]
@lexburner lexburner changed the title feat: HiCoding 功能模块 - AI 编程助手集成 feat: HiCoding 模块与 Skill 市场集成 Mar 16, 2026
pty4j 的传递依赖 purejavacomm 不在 Maven Central,需要从 JetBrains 仓库下载

🤖 Generated with [Qoder][https://qoder.com]
@lexburner lexburner changed the title feat: HiCoding 模块与 Skill 市场集成 feat: 集成 HiCoding 模块与 Skill 市场功能 Mar 16, 2026
purejavacomm 是 pty4j 的传递依赖,需要从 JetBrains intellij-dependencies 仓库下载

🤖 Generated with [Qoder][https://qoder.com]
dorny/test-reporter 在 fork PR 中缺少 checks:write 权限导致报告生成失败,
该步骤仅用于生成测试报告,不应阻塞 CI 流程

🤖 Generated with [Qoder][https://qoder.com]
@lexburner lexburner requested a review from learnerjohn March 16, 2026 08:29
@learnerjohn learnerjohn merged commit 1b1df10 into higress-group:main Mar 16, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants